//package com.example.binpacking.controller;
//
//import com.example.binpacking.model.Result;
//import com.example.binpacking.model.User;
//import com.example.binpacking.service.Impl.UserServiceImpl;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//@SuppressWarnings({"all"})
//@RestController
//@RequestMapping("/user")
//public class UserController {
//
//    @Autowired
//    UserServiceImpl userServiceImpl;
//    //登录
//    @RequestMapping("/login")
//    public Result login(@RequestParam String username, @RequestParam String password) {
//        String msg = userServiceImpl.loginService(username, password);
//        if (("SUCCESS").equals(msg)) {
//            return Result.success("登录成功");
//        } else {
//            return Result.fail(msg);
//        }
//    }
//    //注册
//    @RequestMapping("/register")
//    public Result login(@RequestBody User user) {
//        String msg = userServiceImpl.registerService(user);
//        if (("SUCCESS").equals(msg)) {
//            return Result.success("注册成功");
//        } else {
//            return Result.fail(msg);
//        }
//    }
//
//
//}
